<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1">
    <!-- Google Chrome Frame也可以让IE用上Chrome的引擎: -->
    <meta name="renderer" content="webkit">
    <!--国产浏览器高速模式-->
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- 公共样式 开始 -->
    <link rel="shortcut icon" href="images/favicon.ico"/>
    <link rel="bookmark" href="images/favicon.ico"/>
    <link rel="stylesheet" type="text/css" href="css/base.css">
    <link rel="stylesheet" type="text/css" href="css/iconfont.css">
    <script type="text/javascript" src="framework/jquery-1.11.3.min.js"></script>
    <link rel="stylesheet" type="text/css" href="layui/css/layui.css">
    <script type="text/javascript" src="layui/layui.js"></script>
    <!-- 公共样式 结束 -->

    <link rel="stylesheet" type="text/css" href="css/login1.css">
    <script type="text/javascript" src="js/login1.js"></script>
</head>

<body>
<div class="loginBg"></div>
<div class="login_main">
    <div class="box">
        <div class="left">
            <img src="images/cover_01.jpg"/>
            <p>人力资源管理系统</p>
        </div>
        <div class="right">
            <form class="layui-form layui-form-pane" action="admin/login" method="post">
                <div class="layui-form-item">
                    <label class="layui-form-label login_title"><i
                            class="iconfont icon-gerenzhongxin-denglu"></i></label>
                    <div class="layui-input-block login_input">
                        <input type="text" name="name" required lay-verify="required" autocomplete="off"
                               placeholder="请输入您的用户名" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label login_title"><i class="iconfont icon-mima1"></i></label>
                    <div class="layui-input-block login_input">
                        <input type="password" name="pwd" required lay-verify="required" autocomplete="off"
                               placeholder="请输入密码"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <button class="layui-btn layui-btn-fluid login_but" lay-submit lay-filter="loginBut">登 录</button>
                </div>
                <div class="layui-form-item">
                    <input type="radio" name="type" value="admin" title="管理员" checked lay-filter="userType">

                    <input type="radio" name="type" value="user" title="用户" lay-filter="userType">
                </div>
            </form>
        </div>
    </div>
</div>
<script>
    layui.use('form', function () {
        var form = layui.form;
        /*//监听提交
        form.on('submit(loginBut)', function (data) {
            layer.msg(JSON.stringify(data.field));
            return true;
        });*/
        //监听用户类型，改变风格
        form.on('radio(userType)', function (data) {
            if (data.value == "admin") {
                $(".loginBg").css("background", "url('images/login_admin_bg.jpg')");
                $(".login_but").css("cssText", "background-color:#57c201 !important");
            }
            if (data.value == "user") {
                $(".loginBg").css("background", "url('images/login_fj_bg.jpg')");
                $(".login_but").css("cssText", "background-color:#05D2FF !important");
            }
        });
    });
</script>
</body>

</html>
